-
Notifications
You must be signed in to change notification settings - Fork 594
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
chore(storage): upgrade write limit #12658
Conversation
…nto li0k/storage_upgrade_write_limit
Codecov Report
@@ Coverage Diff @@
## main #12658 +/- ##
==========================================
- Coverage 69.31% 69.30% -0.02%
==========================================
Files 1470 1470
Lines 241559 241592 +33
==========================================
- Hits 167443 167441 -2
- Misses 74116 74151 +35
Flags with carried forward coverage won't be shown. Click here to find out more.
... and 5 files with indirect coverage changes 📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Rest LGTM
src/meta/src/hummock/manager/mod.rs
Outdated
// We've already lowered the default limit for write limit in PR-12183, and to prevent older clusters from continuing to use the outdated configuration, we've introduced a new logic to rewrite it in a uniform way. | ||
let mut rewrite_cg_ids = vec![]; | ||
for (cg_id, compaction_group_config) in &mut configs { | ||
// update write limit | ||
let relaxed_default_write_stop_level_count = 1000; | ||
if compaction_group_config | ||
.compaction_config | ||
.level0_sub_level_compact_level_count | ||
== relaxed_default_write_stop_level_count | ||
{ | ||
rewrite_cg_ids.push(*cg_id); | ||
} | ||
} | ||
|
||
// update meta store | ||
let result = self | ||
.compaction_group_manager | ||
.write() | ||
.await | ||
.update_compaction_config( | ||
&rewrite_cg_ids, | ||
&[ | ||
mutable_config::MutableConfig::Level0StopWriteThresholdSubLevelNumber( | ||
compaction_config::level0_stop_write_threshold_sub_level_number(), | ||
), | ||
], | ||
self.env.meta_store(), | ||
) | ||
.await?; | ||
|
||
// update memory | ||
for new_config in result { | ||
configs.insert(new_config.group_id(), new_config); | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we log the cg id and the updated config when the rewrite happens?
…nto li0k/storage_upgrade_write_limit
…nto li0k/storage_upgrade_write_limit
I hereby agree to the terms of the RisingWave Labs, Inc. Contributor License Agreement.
What's changed and what's your intention?
We've already lowered the default limit for write limit in #12183, and to prevent older clusters from continuing to use the outdated configuration, we've introduced a new logic to rewrite it in a uniform way.
Checklist
./risedev check
(or alias,./risedev c
)Documentation
Release note
If this PR includes changes that directly affect users or other significant modifications relevant to the community, kindly draft a release note to provide a concise summary of these changes. Please prioritize highlighting the impact these changes will have on users.